#!/bin/bash
scriptname=`readlink -e "$0"`
scriptpath=`dirname "$scriptname"`
cd "$scriptpath"
set -e

hostname=`cat /etc/hostname`
datetime=`date +%Y%m%d_%H%M`

cp  -p /usr/share/mythtv/mythweb/modules/tv/classes/Schedule.php $scriptpath/../backup/${hostname}_${datetime}_Schedule.php
sudo patch /usr/share/mythtv/mythweb/modules/tv/classes/Schedule.php Schedule.php.2.patch

